﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE	html PUBLIC	"-//W3C//DTD XHTML 1.1 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html	xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"	/>
 <title>贵美商城</title>
 <link rel="stylesheet"	type="text/css"	href="css/global.css"	/>
 <link rel="stylesheet"	type="text/css"	href="css/layout.css"	/>
<script type="text/javascript" src="js/1.11.1.js"></script>
<script type="text/javascript">
 $(function(){
 	$("#login").click(function(){
 	
 	if ($("#username").val()==""|| $("#username").val()==null) {
		$("#pwdMsg").text("账号密码不能为空");
		return false;
	}
	if ($("#password").val()==""|| $("#password").val()==null) {
		$("#pwdMsg").text("账号密码不能为空");
		return false;
	}
 		$.ajax({
   			type: "POST",
   			url: "LoginServlet",
  			data: {username:$("#username").val(),password:$("#password").val()},
  			dataType :"xml",
  			success: function(msg){
  			var message=msg.getElementsByTagName("result")[0].firstChild.nodeValue;
  			if(message=="success"){
  				window.location.href="login_success.jsp";
  			}else{
  			$("#username").val("");
  			$("#password").val("");
  			$("#pwdMsg").html(message);
  			}
   }
}); 
 	
 	});
 });
</script> 	
</head>
<body>
<div id="container">
	<iframe id="header" src="header.jsp" width="980" height="136" frameborder="0" scrolling="no"></iframe>
	<div class="login">
		<ul class="form f_l">
			<h1><img src="images/logintitle.gif" alt="会员登录" /></h1>
			<li class="login_list"><label>会员名：</label><input type="text" name="username" id="username"/></li>
			<li class="login_list"><label>密&nbsp;&nbsp;&nbsp;码：</label><input type="password" name="password" id="password"/><span id="pwdMsg" style="color: red"></span></li>
			<li class="a_c"><img src="images/login.gif" alt="登录" id="login"/></li>
			<li class="desc">&delta;&nbsp;&nbsp;<a href="#">什么是安全登录</a>。</li>
			<li class="desc">&delta;&nbsp;&nbsp;香港會員（繁體中文用戶）由此<a href="#">登入</a></li>
			<li class="desc">&delta;&nbsp;&nbsp;<a href="#">密码安全贴士</a>。</li>
			<li class="desc">&delta;&nbsp;&nbsp;防止病毒或者木马窃取您的账户信息，<a href="#">在线检查</a>您的电脑是否安全。</li>						
		</ul>
			<h1><img src="images/register.gif" alt="注册会员" /></h1>
		<ul class="aside f_l">
			<li class="regpic"><span>便宜有好货！</span>超过7000万件商品任您选。</li>
		 	<li class="regpic regpic2"><span>买卖更安全！</span>交易超安全。</li>
			<li class="regpic regpic3"><span>免费开网店！</span>轻松赚钱交友。</li>
			<li class="regpic regpic4"><span>超人气社区！</span>彩活动每一天</li>
			<li class="a_c"><a href="#"><img src="images/registernow.gif" alt="现在就注册" /></a></li>
			<ul class="reged">
			<li class="regpic regpic5">您已经是会员？<a href="#">由此登入</a></li>
			<li class="regpic regpic6">繁体中文用户由此<a href="#">注册</a></li>
			</ul>
		</ul>
	</div>
	<iframe id="footer" src="footer.jsp" width="980" height="136" frameborder="0" scrolling="no"></iframe>
</div> <!--container end-->	
</body>
</html>
